<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精酿酒花互动表</title>
    <style>
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #e67e22;
            --background-color: #f5f6fa;
            --card-background: #ffffff;
            --text-color: #2c3e50;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }

        body {
            background-color: var(--background-color);
            color: var(--text-color);
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        header {
            text-align: center;
            margin-bottom: 40px;
            padding: 20px;
            background: var(--card-background);
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        h1 {
            color: var(--primary-color);
            font-size: 2.5em;
            margin-bottom: 10px;
        }

        .hop-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .hop-card {
            background: var(--card-background);
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s ease;
            cursor: pointer;
        }

        .hop-card:hover {
            transform: translateY(-5px);
        }

        .hop-name {
            font-size: 1.5em;
            color: var(--secondary-color);
            margin-bottom: 15px;
        }

        .hop-details {
            margin-top: 15px;
        }

        .hop-detail {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            padding: 5px 0;
            border-bottom: 1px solid #eee;
        }

        .flavor-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-top: 10px;
        }

        .flavor-tag {
            background: var(--secondary-color);
            color: white;
            padding: 3px 8px;
            border-radius: 15px;
            font-size: 0.8em;
        }

        .search-bar {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 2px solid var(--primary-color);
            border-radius: 5px;
            font-size: 1em;
        }

        .filter-section {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .filter-button {
            padding: 8px 15px;
            border: none;
            border-radius: 5px;
            background: var(--primary-color);
            color: white;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .filter-button:hover {
            background: var(--secondary-color);
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>精酿酒花互动表</h1>
            <p>探索不同酒花的风味特征和酿造特性</p>
        </header>

        <input type="text" class="search-bar" placeholder="搜索酒花名称、风味或特性...">

        <div class="filter-section">
            <button class="filter-button">柑橘类</button>
            <button class="filter-button">热带水果</button>
            <button class="filter-button">松木</button>
            <button class="filter-button">花香</button>
            <button class="filter-button">草本</button>
        </div>

        <div class="hop-grid">
            <div class="hop-card">
                <div class="hop-name">西楚 (Citra)</div>
                <div class="hop-details">
                    <div class="hop-detail">
                        <span>α-酸含量</span>
                        <span>11-13%</span>
                    </div>
                    <div class="hop-detail">
                        <span>β-酸含量</span>
                        <span>3.5-4.5%</span>
                    </div>
                    <div class="hop-detail">
                        <span>总油含量</span>
                        <span>2.2-2.8 ml/100g</span>
                    </div>
                    <div class="flavor-tags">
                        <span class="flavor-tag">柑橘</span>
                        <span class="flavor-tag">热带水果</span>
                        <span class="flavor-tag">葡萄柚</span>
                    </div>
                </div>
            </div>

            <div class="hop-card">
                <div class="hop-name">马赛克 (Mosaic)</div>
                <div class="hop-details">
                    <div class="hop-detail">
                        <span>α-酸含量</span>
                        <span>12-14%</span>
                    </div>
                    <div class="hop-detail">
                        <span>β-酸含量</span>
                        <span>3.3-3.7%</span>
                    </div>
                    <div class="hop-detail">
                        <span>总油含量</span>
                        <span>1.5-2.5 ml/100g</span>
                    </div>
                    <div class="flavor-tags">
                        <span class="flavor-tag">蓝莓</span>
                        <span class="flavor-tag">芒果</span>
                        <span class="flavor-tag">草本</span>
                    </div>
                </div>
            </div>

            <div class="hop-card">
                <div class="hop-name">银河 (Galaxy)</div>
                <div class="hop-details">
                    <div class="hop-detail">
                        <span>α-酸含量</span>
                        <span>13-15%</span>
                    </div>
                    <div class="hop-detail">
                        <span>β-酸含量</span>
                        <span>5.5-8%</span>
                    </div>
                    <div class="hop-detail">
                        <span>总油含量</span>
                        <span>2.5-3.5 ml/100g</span>
                    </div>
                    <div class="flavor-tags">
                        <span class="flavor-tag">百香果</span>
                        <span class="flavor-tag">桃子</span>
                        <span class="flavor-tag">柑橘</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 搜索功能
        const searchBar = document.querySelector('.search-bar');
        const hopCards = document.querySelectorAll('.hop-card');

        searchBar.addEventListener('input', (e) => {
            const searchTerm = e.target.value.toLowerCase();
            
            hopCards.forEach(card => {
                const hopName = card.querySelector('.hop-name').textContent.toLowerCase();
                const flavorTags = Array.from(card.querySelectorAll('.flavor-tag'))
                    .map(tag => tag.textContent.toLowerCase());
                
                const isVisible = hopName.includes(searchTerm) || 
                                flavorTags.some(tag => tag.includes(searchTerm));
                
                card.style.display = isVisible ? 'block' : 'none';
            });
        });

        // 过滤功能
        const filterButtons = document.querySelectorAll('.filter-button');
        
        filterButtons.forEach(button => {
            button.addEventListener('click', () => {
                const filterTerm = button.textContent.toLowerCase();
                
                hopCards.forEach(card => {
                    const flavorTags = Array.from(card.querySelectorAll('.flavor-tag'))
                        .map(tag => tag.textContent.toLowerCase());
                    
                    const isVisible = flavorTags.some(tag => tag.includes(filterTerm));
                    card.style.display = isVisible ? 'block' : 'none';
                });
            });
        });
    </script>
</body>
</html> 